<template>
    <div v-show="isToExam" class="to-exam">
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <el-page-header @back="toMyExam" content="报考信息">
                </el-page-header>
            </div>
            <div>
                <el-form label-position="right" label-width="auto" :model="examForm">
                    <el-steps align-center :active="active" finish-status="success">
                        <el-step title="步骤 1"></el-step>
                        <el-step title="步骤 2"></el-step>
                        <el-step title="步骤 3"></el-step>
                    </el-steps>
                    <div style="padding: 20px">
                        <div v-show="active == 1">
                            <el-row :gutter="20">
                                <el-col :span="8">
                                    <el-form-item label="姓拼音:">
                                        <el-input v-model="examForm.last_py"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="名拼音:">
                                        <el-input v-model="examForm.first_py"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20">
                                <el-col :span="8">
                                    <el-form-item label="毕业学校:">
                                        <el-input v-model="examForm.school"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="毕业时间:">
                                        <el-date-picker type="date" placeholder="选择日期" v-model="examForm.grad_time" style="width: 100%;"></el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20">
                                <el-col :span="8">
                                    <el-form-item label="最高学历:">
                                        <el-select v-model="examForm.hig_edu" placeholder="最高学历">
                                            <el-option label="硕士研究生" value="硕士研究生"></el-option>
                                            <el-option label="博士" value="博士"></el-option>
                                            <el-option label="本科" value="本科"></el-option>
                                            <el-option label="大专" value="大专"></el-option>
                                            <el-option label="中专/职技校" value="中专/职技校"></el-option>
                                            <el-option label="高中" value="高中"></el-option>
                                            <el-option label="其他" value="其他"></el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="专业门类:">
                                        <el-input v-model="examForm.major"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </div>
                        <div v-show="active == 2">
                            <el-row :gutter="20">
                                <el-col :span="8">
                                    <el-form-item label="单位名称:">
                                        <el-input v-model="examForm.com_name"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="现有职务:">
                                        <el-input v-model="examForm.work_duty"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20">
                                <el-col :span="8">
                                    <el-form-item label="现有职务英文:">
                                        <el-input v-model="examForm.work_duty_en"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="现有职称:">
                                        <el-input v-model="examForm.work_title"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20">
                                <el-col :span="8">
                                    <el-form-item label="从业年限:">
                                        <el-input v-model="examForm.work_age"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </div>
                        <div v-show="active == 3">
                            <el-row :gutter="20">
                                <el-col :span="8">
                                    <el-form-item label="考试级别:">
                                        <el-input v-model="examForm.course"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="考试时间:">
                                        <el-input v-model="examForm.exam_date"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20">
                                <el-col :span="8">
                                    <el-form-item label="考试城市:">
                                        <el-input v-model="examForm.exam_city"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="是否参加培训:">
                                        <el-input v-model="examForm.is_train"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20">
                                <el-col>
                                    <el-form-item label="证件照:">
                                        <el-input v-model="examForm.photo"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col>
                                    <el-form-item label="电子签名:">
                                        <el-input v-model="examForm.sign"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </div>
                        <!--                    <upload></upload>-->
                    </div>
                </el-form>
                <el-button v-if="active > 1 && active < 4" style="margin-top: 12px;" @click="pre">上一步</el-button>
                <el-button v-if="active < 4" style="margin-top: 12px;" @click="next">下一步</el-button>
            </div>
        </el-card>
    </div>
</template>

<script>
    import upload from "../upload/upload";

    export default {
        name: "toExam",
        props:{
            isToExam:{
                type:Boolean
            }
        },
        data() {
            return {
                active: 1,
                examForm: {
                    last_py: '',//姓拼音
                    first_py: '',//名拼音
                    school: '',//毕业学校
                    grad_time: '',//毕业时间
                    hig_edu: '',//最高学历
                    major: '',//专业门类
                    com_name: '',//单位名称
                    work_duty: '',//现有职务
                    work_duty_en: '',//现有职务英文
                    work_title: '',//现有职称
                    work_age: '',//从业年限
                    course: '',//考试级别
                    exam_date: '',//考试时间
                    exam_city: '',//考试城市 (薪酬管理师)
                    is_train: '',//是否参加培训 (薪酬管理师)
                    photo: '',//上传证件照片
                    sign: '',//电子签名
                }
            };
        },

        methods: {
            toMyExam() {
                this.isToExam = false;
            },
            pre() {
                if (this.active-- < 2) this.active = 1
            },
            next() {
                if (this.active++ > 3) this.active = 1;
            }
        },
        components: {
            upload
        }
    }
</script>

<style scoped>

</style>
